API Testing and Development 
with Postman by Dave Westerveld

API Testing and Development 
with Postman by Dave Westerveld

Author:Dave Westerveld
Language: eng
Format: epub, mobi
Publisher: Packt Publishing Pvt. Ltd.
Published: 2021-04-20T00:00:00+00:00


Now that you have a working request, let's look at how to set up a data-driven test. Since a data-driven test takes in multiple inputs, you will need some kind of variable, or something that changes with each input. That is called a parameter, and for this example, I want you to parameterize the user ID in the URL. You can do that by turning it into a variable with the following steps:

Replace the 1 in the URL with a variable called {{userId}}.

For ease of management, create an environment to save this variable in by clicking on the New button and choosing the Environment option.

Name the environment JSON API Env and create the userId variable with an initial value of 1, and then click the Add button to create the environment.

Close the dialog and then choose JSON API Env from the environment dropdown at the top right of the Postman application.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.